package com.youhome.service.service.impl;

import com.youhome.service.mapper.CompanyTokenMapper;
import com.youhome.service.model.CompanyToken;
import com.youhome.service.service.CompanyTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chen365 on 2019/03/27.
 */
@Service
public class CompanyTokenServiceImpl implements CompanyTokenService {
    @Autowired
    private CompanyTokenMapper companyTokenMapper;

    @Override
    public int deleteByPrimaryKey(Long tokenId) {
        return companyTokenMapper.deleteByPrimaryKey(tokenId);
    }

    @Override
    public int insert(CompanyToken record) {
        return companyTokenMapper.insert(record);
    }

    @Override
    public int insertSelective(CompanyToken record) {
        return companyTokenMapper.insertSelective(record);
    }

    @Override
    public CompanyToken selectByPrimaryKey(Long tokenId) {
        return companyTokenMapper.selectByPrimaryKey(tokenId);
    }

    @Override
    public CompanyToken selectByCompanyId(Long companyId) {
        return companyTokenMapper.selectByCompanyId(companyId);
    }

    @Override
    public List<CompanyToken> selectByAll() {
        return companyTokenMapper.selectByAll();
    }

    @Override
    public int updateByPrimaryKeySelective(CompanyToken record) {
        return companyTokenMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CompanyToken record) {
        return companyTokenMapper.updateByPrimaryKey(record);
    }
}
